/**
 * Copyright &copy; 2015-2020 <a href="http://www.jeeplus.org/">JeePlus</a> All rights reserved.
 */
package com.z100h.supplychain.evidence.mapper;

import java.util.List;

import org.apache.ibatis.annotations.Param;

import com.jeeplus.core.persistence.BaseMapper;
import com.jeeplus.core.persistence.annotation.MyBatisMapper;
import com.z100h.supplychain.evidence.entity.Stockout;

/**
 * 出库单MAPPER接口
 * @author madara
 * @version 2019-01-18
 */
@MyBatisMapper
public interface StockoutMapper extends BaseMapper<Stockout> {

	public void insertStockoutOrder(@Param("orderId") String orderId, @Param("evidenceId") String evidenceId);

	public void insertStockoutOrderWithType(@Param("serviceType") String serviceType,
			@Param("serviceId") String serviceId, @Param("evidenceId") String evidenceId);

	public List<String> findStockoutOrderByEid(@Param("evidenceId") String evidenceId);

	public List<String> findStockoutRepairByEid(@Param("evidenceId") String evidenceId);

	public List<String> findMonthErrorStockoutOrderByEid(@Param("evidenceId") String evidenceId);

	public List<String> findMonthErrorStockoutRepairByEid(@Param("evidenceId") String evidenceId);

	public List<Stockout> findQcList(Stockout stockout);

	public List<Stockout> findOutList(Stockout stockout);

	public void deleteRdOfSpec(String stockroomId);

	public void deleteRdOfSpecConsist(String stockroomId);

	public void updateRepairOpState(String stockroomId);

	public void updateStockoutState(@Param("evidenceId") String evidenceId, @Param("state") String state,
			@Param("date") String date);

	public List<String> findRepairIdsByEids(@Param("eids") List<String> eids);

	public List<String> findCanFinishEids(String companyId);

	public Stockout findById(String id);

}